﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Think.Lenovo.Com.DataAccess;
using System.Data;

namespace Think.Lenovo.Com.home
{
    /// <summary>
    /// 产品详细页
    /// </summary>
    public partial class productView : System.Web.UI.Page
    {
        productInfo info = new productInfo();
        int id;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString.Count > 0)
                {
                    id = Int32.Parse(Request.QueryString["id"].ToString());
                    BindData();
                }
            }
        }

        public void BindData()
        {
            DataSet ds = info.GetProductId(id);

            Lbl_title.Text = ds.Tables[0].Rows[0][1].ToString();
            Image1.ImageUrl = ds.Tables[0].Rows[0][3].ToString();
            lbl_Content.Text = ds.Tables[0].Rows[0][4].ToString();
        }
    }
}